<?php

namespace App\Console\Commands\Tools\SystemNotify;


use App\Models\Activity\ShopOrderActivityModel;
use App\Remote\Rms\RmsUserRemote;
use App\Service\Activity\ShopOrderActivityService;
use App\Service\System\SystemNotifyService;
use App\Service\WorkOrder\Appraise\NotifyService;
use Illuminate\Console\Command;

class SendMsg extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'tools:system_notify:send_msg';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = '工具类:消息通知:订单推送';

    public function handle()
    {
        $activityId = 1;
        $messageId  = 1;

        $params = (object)[
            'businessType' => ShopOrderActivityModel::BUSINESS_TYPE_2,
            "id"           => $activityId,
            "export"       => 1
        ];

        $shopIds = [
            23,
            12010
        ];

        $userList = RmsUserRemote::getShopManagerUserByShopId($shopIds)['lists'];

        $userIds = array_column($userList, 'userId');


        $userIdsStr = implode(',', $userIds);

        dd($userIdsStr);

//        dd($userIds);
//
//        // 未报名的活动人员
//        $userIdList = array_values(array_unique(array_column($allUserList, 'userId')));

//        SystemNotifyService::preSend($messageId, $userIdList);
    }
}
